/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.demo.service.impl;

import com.demo.dao.RoleDao;
import com.demo.model.Account;
import com.demo.model.Role;
import com.demo.service.RoleService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

/**
 *
 * @author admin
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService{
	
	@Resource(name="roleDao")
	RoleDao roleDao;

	@Override
	public Role getByAccountAndRole(Account account, String string) {
		return roleDao.getByAccountAndRole(account, string);
	}

	@Override
	public List<Role> getByAccount(Account account) {
		return roleDao.getByAccount(account);
	}

	@Override
	public Role save(Role model) {
		return roleDao.save(model);
	}

	@Override
	public Role get(Long id) {
		return roleDao.get(id);
	}

	@Override
	public void remove(Long id) {
		roleDao.remove(id);
	}

	@Override
	public List<Role> getAll() {
		return roleDao.getAll();
	}
	
}
